package com.smasher.state;

public class StateViewConfig {

    private int loadingColor;
    private int emptyColor;
    private int netErrorColor;
    private int errorColor;

    private static class Holder {
        public static final StateViewConfig INSTANCE = new StateViewConfig();
    }

    private StateViewConfig() {

    }

    public static StateViewConfig getInstance() {
        return Holder.INSTANCE;
    }

    private final int colorWhite = android.R.color.white;

    public int getLoadingColor() {
        return loadingColor == 0 ? colorWhite : loadingColor;
    }

    public void setLoadingColor(int loadingColor) {
        this.loadingColor = loadingColor;
    }

    public int getEmptyColor() {
        return emptyColor == 0 ? colorWhite : emptyColor;
    }

    public void setEmptyColor(int emptyColor) {
        this.emptyColor = emptyColor;
    }

    public int getNetErrorColor() {
        return netErrorColor == 0 ? colorWhite : netErrorColor;
    }

    public void setNetErrorColor(int netErrorColor) {
        this.netErrorColor = netErrorColor;
    }

    public int getErrorColor() {
        return errorColor == 0 ? colorWhite : errorColor;
    }

    public void setErrorColor(int errorColor) {
        this.errorColor = errorColor;
    }
}
